<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="common::header('排行榜-'+${name},'排行榜-'+${name},${description})">
</head>
<body>
<div class="main">
    <div th:replace="common::contentHeader(${name})"></div>
    <div th:replace="common::contentNav"></div>
	<div class="rankingnav">
	    <ul>
	        <li th:class="@{(${sort == 'allVisit'} ? ' bold' :'' )}"><a th:href="@{top(sort=allVisit,page=1)}" href="/paihang/allvisit_1.html">总点击榜</a></li>
	        <li th:class="@{(${sort == 'monthVisit'} ? ' bold' :'' )}"><a th:href="@{top(sort=monthVisit,page=1)}" href="/paihang/monthvisit_1.html">月点击榜</a></li>
	        <li th:class="@{(${sort == 'weekVisit'} ? ' bold' :'' )}"><a th:href="@{top(sort=weekVisit,page=1)}" href="/paihang/weekvisit_1.html">周点击榜</a></li>
	        <li th:class="@{(${sort == 'allVote'} ? ' bold' :'' )}"><a th:href="@{top(sort=allVote,page=1)}" href="/paihang/allvote_1.html">总推荐榜</a></li>
	        <li th:class="@{(${sort == 'monthVote'} ? ' bold' :'' )}"><a th:href="@{top(sort=monthVote,page=1)}" href="/paihang/monthvote_1.html">月推荐榜</a></li>
	        <li th:class="@{(${sort == 'weekVote'} ? ' bold' :'' )}"><a th:href="@{top(sort=weekVote,page=1)}" href="/paihang/weekvote_1.html">周推荐榜</a></li>
	        <li th:class="@{(${sort == 'size'} ? ' bold' :'' )}"><a th:href="@{top(sort=size,page=1)}" href="/paihang/size_1.html">总字数榜</a></li>
	        <li th:class="@{(${sort == 'lastUpdate'} ? ' bold' :'' )}"><a th:href="@{top(sort=lastUpdate,page=1)}" href="/paihang/postdate_1.html">最新更新</a></li>
	        <li th:class="@{(${sort == 'postDate'} ? ' bold' :'' )}"><a th:href="@{top(sort=postDate,page=1)}" href="/paihang/goodnum_1.html">最新入库</a></li>
	    </ul>
	    <div class="clear"></div>
	</div>
	<table class="grid" cellpadding="0" cellspacing="0" id="rankinglist" width="100%" align="center">
	    <tr align="left">
	        <th width="20%">小说书名</th>
	        <th width="40%">最新章节</th>
	        <th width="15%">作者</th>
	        <th width="9%">字数</th>
	        <th width="10%">更新</th>
	        <th width="6%">状态</th>
	    </tr>
	    <tr th:each="article:${articleList}">
	        <td><p><a th:href="@{${article.url}}" th:text="${article.articleName}">articleName</a></p></td>
	        <td><p><a th:href="@{${article.lastChapterUrl}}"  th:text="${article.lastChapter}" target="_blank">lastChapter</a></p></td>
	        <td><p th:text="${article.author}">author</p></td>
	        <td><p th:text="|${article.size/1000}K|">627K</p></td>
	        <td><p th:text="${#dates.format(article.lastUpdate, 'yyyy-MM-dd')}|">2017-12-07</p></td>
	        <td><p th:text="${article.fullFlag} ? 完结 : 连载中 ">连载中</p></td>
	    </tr>
	</table>
    
    <div class="pagelink" id="pagelink" th:if="${articleList.totalPages gt 0}">
	    <span id="pagestats" th:text="|${page}/${articleList.totalPages}|">1/288</span>
	    <a th:href="@{/articleList(category=${category},page=1)}" class="pgroup">首页</a>
	    <a th:if="${page gt 1}" th:href="@{/articleList(category=${category},page=${page-1})}" class="prev">上页</a>
        <a th:each="i:${#numbers.sequence(page-4 , page + 4)}" th:href="@{/articleList(category=${category},page=${i})}" th:text="${i}" th:if="${i ge 1 and i le articleList.totalPages}" >num</a>
	    <a th:if="${page lt articleList.totalPages}" th:href="@{/articleList(category=${category},page=${page+1})}" class="next">下页</a>
	    <a th:href="@{/articleList(category=${category},page=${articleList.totalPages})}"  class="ngroup">尾页</a>
    </div>
    <div th:replace="common::footer(${copyright},${support})" ></div>
</div>
</body>
</html>